/*
 * Chromosome.h
 *
 *  Created on: Jan 9, 2012
 *      Author: luiz
 */

#ifndef CHROMOSOME_H_
#define CHROMOSOME_H_

#include <vector>
#include "GeneCell.h"

class Chromosome
{
    int  num_genes_;
    std::vector<GeneCell> gene_cells_;

public:
    Chromosome(int num_genes=0);
    Chromosome(const Chromosome & chromossome);
    Chromosome & operator=(const Chromosome & chromossome);
    virtual ~Chromosome();


    std::vector<GeneCell> get_gene_cells() const;
    std::vector<int> get_clock_cells();
    void set_gene_cells(const std::vector<GeneCell> & gene_cells);

    GeneCell get_cell_by_position(int position);

    void generate_sequencial_gene();
    void generate_random_gene();
    void define_gene_order(std::vector<int> gene_ordered);
    void define_gene_different_clock_zone_order(std::vector<int> clock_zone_ordered);
    void set_gene_at_position(int position, const GeneCell & gene_cell);
    void swap_gene_cell(int position_origin,int position_destination);

    int get_gene_size();

    //bool operator==(const Chromosome &c) const;
    bool operator<(const Chromosome &c) const;

    std::string print_chromosome() const;
};

#endif /* CHROMOSOME_H_ */
